home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIToolkitProfile.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  118 lines

  1. /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is the new Mozilla toolkit.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Benjamin Smedberg <bsmedberg@covad.net>
  19.  * Portions created by the Initial Developer are Copyright (C) 2004
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. interface nsILocalFile;
  41. interface nsIToolkitProfile;
  42. interface nsIProfileUnlocker;
  43.  
  44. /**
  45.  * Hold on to a profile lock. Once you release the last reference to this
  46.  * interface, the profile lock is released.
  47.  */
  48. [scriptable, uuid(50e07b0a-f338-4da3-bcdb-f4bb0db94dbe)]
  49. interface nsIProfileLock : nsISupports
  50. {
  51.     /**
  52.      * The main profile directory.
  53.      */
  54.     readonly attribute nsILocalFile directory;
  55.     
  56.     /**
  57.      * A directory corresponding to the main profile directory that exists for
  58.      * the purpose of storing data on the local filesystem, including cache
  59.      * files or other data files that may not represent critical user data.
  60.      * (e.g., this directory may not be included as part of a backup scheme.)
  61.      *
  62.      * In some cases, this directory may just be the main profile directory.
  63.      */
  64.     readonly attribute nsILocalFile localDirectory;
  65.  
  66.     /**
  67.      * Unlock the profile.
  68.      */
  69.     void unlock();
  70. };
  71.  
  72. /**
  73.  * A interface representing a profile.
  74.  * @note THIS INTERFACE SHOULD BE IMPLEMENTED BY THE TOOLKIT CODE ONLY! DON'T
  75.  *       EVEN THINK ABOUT IMPLEMENTING THIS IN JAVASCRIPT!
  76.  */
  77. [scriptable, uuid(7422b090-4a86-4407-972e-75468a625388)]
  78. interface nsIToolkitProfile : nsISupports
  79. {
  80.     /**
  81.      * The location of the profile directory.
  82.      */
  83.     readonly attribute nsILocalFile rootDir;
  84.  
  85.     /**
  86.      * The location of the profile local directory, which may be the same as
  87.      * the root directory.  See nsIProfileLock::localDirectory.
  88.      */
  89.     readonly attribute nsILocalFile localDir;
  90.  
  91.     /**
  92.      * The name of the profile.
  93.      */
  94.     attribute AUTF8String name;
  95.  
  96.     /**
  97.      * Removes the profile from the registry of profiles.
  98.      *
  99.      * @param removeFiles
  100.      *        Indicates whether or not the profile directory should be
  101.      *        removed in addition.
  102.      */
  103.     void remove(in boolean removeFiles);
  104.  
  105.     /**
  106.      * Lock this profile using platform-specific locking methods.
  107.      *
  108.      * @param lockFile If locking fails, this may return a lockFile object
  109.      *                 which can be used in platform-specific ways to
  110.      *                 determine which process has the file locked. Null
  111.      *                 may be passed.
  112.      * @return An interface which holds a profile lock as long as you reference
  113.      *         it.
  114.      * @throws NS_ERROR_FILE_ACCESS_DENIED if the profile was already locked.
  115.      */
  116.     nsIProfileLock lock(out nsIProfileUnlocker aUnlocker);
  117. };
  118.